//
//  ZXSaleBeforeCell.m
//  qianke
//
//  Created by ZX on 2017/7/18.
//  Copyright © 2017年 ZX. All rights reserved.
//

#import "ZXSaleBeforeCell.h"
@implementation ZXSaleBeforeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setFrame:(CGRect)frame{
    frame.size.height -= 1;
    [super setFrame:frame];
}
-(void)setZXsaleModel1:(ZXsaleModel *)ZXsaleModel1{
    
}
-(void)setZXSaleBeforeModel1:(ZXSaleBeforeModel *)ZXSaleBeforeModel1{
    self.beforeCellLabel1.text = [NSString stringWithFormat:@"%@", ZXSaleBeforeModel1.salesConsultant];
    self.beforeCellLabel2.text = [NSString stringWithFormat:@"%@", ZXSaleBeforeModel1.jiaoChe];
    self.beforeCellLabel3.text = [NSString stringWithFormat:@"%@", ZXSaleBeforeModel1.dingChe];
    self.beforeCellLabel4.text = [NSString stringWithFormat:@"%@", ZXSaleBeforeModel1.retainedCustomer];
    self.beforeCellLabel5.text = [NSString stringWithFormat:@"%@", ZXSaleBeforeModel1.testDriveCount];
    self.adviserNo = ZXSaleBeforeModel1.adviserNo;
}
-(void)setZXxiaoshouguwen1:(ZXxiaoshouguwen *)ZXxiaoshouguwen1{
    self.XNoticeId = ZXxiaoshouguwen1.noticeId;
    NSString * str = [ZXToolObj timeWithTimeIntervalString:ZXxiaoshouguwen1.closingTime];
    _xiaoshouguwenLabel1.text = [NSString stringWithFormat:@"%@",ZXxiaoshouguwen1.customerName];
    if (ZXxiaoshouguwen1.phone.length>0&&![ZXxiaoshouguwen1.phone isEqual:[NSNull null]]) {
        _xiaoshouguwenLabel2.text = [NSString stringWithFormat:@"%@",ZXxiaoshouguwen1.phone];
    }else{
        _xiaoshouguwenLabel2.text =@"暂无电话信息";
    }
    _xiaoshouguwenLabel3.text = [NSString stringWithFormat:@"%@",ZXxiaoshouguwen1.modelName];
    
    _xiaoshouguwenLabel4.text = [NSString stringWithFormat:@"%.2f",[ZXxiaoshouguwen1.transactionPrice doubleValue]];
    
    self.xiaoshouguwenLabel5.text = str;
}
-(void)setZXdianneixinxi1:(ZXdianneixinxi *)ZXdianneixinxi1{
    _dianneixinxiLabel1.text = [NSString stringWithFormat:@"%@",ZXdianneixinxi1.carModels];
    _dianneixinxiLabel2.text = [NSString stringWithFormat:@"%@",ZXdianneixinxi1.sendQty];
    _dianneixinxiLabel3.text = [NSString stringWithFormat:@"%@",ZXdianneixinxi1.planQty];
    double liftRate22 = ZXdianneixinxi1.rateOfAchievement.doubleValue*1000;
    double aaaa = round(liftRate22);

    _dianneixinxiLabel4.text = [NSString stringWithFormat:@"%.1f%%",aaaa/10];
}
-(void)setZXSaleAfterModel1:(ZXSaleAfterModel *)ZXSaleAfterModel1{
    _afterLabel1.text = [NSString stringWithFormat:@"%@",ZXSaleAfterModel1.dealerName];
    double liftRate1 = ZXSaleAfterModel1.marketingRevenue.doubleValue*1000;
    double marketingRevenue = round(liftRate1);
    _afterLabel2.text = [NSString stringWithFormat:@"%.2f",marketingRevenue/1000];
    double liftRate2 = ZXSaleAfterModel1.hourIncome.doubleValue*1000;
    double hourIncome = round(liftRate2);
    _afterLabel3.text = [NSString stringWithFormat:@"%.2f",hourIncome/1000];
    double liftRate3 = ZXSaleAfterModel1.partsRevenue.doubleValue*1000;
    double partsRevenue = round(liftRate3);
    _afterLabel4.text = [NSString stringWithFormat:@"%.2f",partsRevenue/1000];
    _afterLabel5.text = [NSString stringWithFormat:@"%@",ZXSaleAfterModel1.taiCi];
    double liftRate22 = ZXSaleAfterModel1.unitPrice.doubleValue*1000;
    double aaaa = round(liftRate22);
    _afterLabel6.text = [NSString stringWithFormat:@"%.2f",aaaa/1000];
}
-(void)setZXZXSaleBeforeLeaderModel1:(ZXZXSaleBeforeLeaderModel *)ZXZXSaleBeforeLeaderModel1{
//    ZXZXSaleBeforeLeaderModel1.dealerName = @"我的我的我的";
    _beforeLeaderCellLabel1.text = [NSString stringWithFormat:@"%@",ZXZXSaleBeforeLeaderModel1.dealerName];
    _beforeLeaderCellLabel2.text = [NSString stringWithFormat:@"%@",ZXZXSaleBeforeLeaderModel1.jiaoCheCount];
    _beforeLeaderCellLabe3.text = [NSString stringWithFormat:@"%@",ZXZXSaleBeforeLeaderModel1.tiCheCount];
    _beforeLeaderCellLabel4.text = [NSString stringWithFormat:@"%@",ZXZXSaleBeforeLeaderModel1.numberOfCarLiftPlan];
    _beforeLeaderCellLabel5.text = [NSString stringWithFormat:@"%@",ZXZXSaleBeforeLeaderModel1.cashSalePlan];
    double liftRate2 = ZXZXSaleBeforeLeaderModel1.liftRate.doubleValue*1000;
    double aaa = round(liftRate2);
    _beforeLeaderCellLabel6.text = [NSString stringWithFormat:@"%.1f%%",aaa/10];
    double liftRate22 = ZXZXSaleBeforeLeaderModel1.actualSellingRate.doubleValue*1000;
    double aaaa = round(liftRate22);
    _beforeLeaderCellLabel7.text = [NSString stringWithFormat:@"%.1f%%",aaaa/10];
    double liftRate3 = ZXZXSaleBeforeLeaderModel1.acountBalance.doubleValue*1000;
    double aaaaa = round(liftRate3);
    _beforeLeaderCellLabel8.text = [NSString stringWithFormat:@"%.2f",aaaaa/1000];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
